/*
 * @Author: 一口价
 * @Date: 2021-03-19 10:11:47
 * @LastEditTime: 2022-09-14 11:12:11
 * @LastEditors: 最后一次编辑说明
 * @Description: In User Settings Edit
 * @FilePath: \adminc:\Users\dell\Desktop\react (1)\新建文件夹\react\src\components\offer\price.jsx
 */
import PriceTerms from '../../components/offer/priceTerms.jsx'
import React, { Component } from 'react'

class Price extends Component {

  constructor(props) {
    super(props);
    this.state = {
      title: ''
    }

  }

  // 页面加载完成
  componentDidMount() {
    // console.log(this)
  }
  getPriceTermsData = (info) => {
    console.log(info)
  }
  setVal = (e) => {
    // console.log(e)
    this.setState({
    });
  }
  jumpDetail = (id, e) => {
    console.log(id, e)
    
  }
  getItem = (e) => {
  // const history = useHistory();

    e.stopPropagation();
    console.log(222222222);
    this.props.history.push({
      pathname: '/detail',
      search: 'id=22222',
    })
   }
  render(h) {
    return (
      <div id="PRICE">
        <PriceTerms title={this.state.title} setPriceTermsData={this.getPriceTermsData.bind(this)}></PriceTerms>

        <div className='PRICE-content' data-id='{id:125s}' onClick={this.jumpDetail.bind(this,{ id: 123 }) }>
          报价数据
          <h3 onClick={this.getItem.bind(this)}>囊经济</h3>
        </div>
      </div>
    )
  }
}
export default Price